package com.skyvin.nreceipts.common.exception;

public class NReceiptsRunTimeException extends RuntimeException {

	private String message;
	private String detailedMessage;
	
	private String locationOfException;
	
	private Exception exception;
	
	public NReceiptsRunTimeException() {
		
	}
	
	public NReceiptsRunTimeException(Exception exception) {
		super();
		this.exception = exception;
		message = exception.getMessage();
		detailedMessage = exception.getLocalizedMessage();		
	}

	public NReceiptsRunTimeException(String locationOfException, String message, String detailedMessage,
			Exception exception) {
		super();
		this.locationOfException = locationOfException;
		this.message = message;
		this.detailedMessage = detailedMessage;
		this.exception = exception;
	} 
	
	public String getFullMessage() {
		return message + ": " + detailedMessage;
	}
	
	public String getExceptionStackTrace() {
		return exception.toString();
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getDetailedMessage() {
		return detailedMessage;
	}

	public void setDetailedMessage(String detailedMessage) {
		this.detailedMessage = detailedMessage;
	}

	public Exception getException() {
		return exception;
	}

	public void setException(Exception exception) {
		this.exception = exception;
	}

	public String getLocationOfException() {
		return locationOfException;
	}

	public void setLocationOfException(String locationOfException) {
		this.locationOfException = locationOfException;
	}
	
	
	
}
